﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Exercise11
{
    public partial class Form1 : Form
    {
        MyStr myStr = new MyStr();
        User user;
        public Form1()
        {
            InitializeComponent();
        }
        private void BtnFindclick(object sender, EventArgs e)
        {
            user = myStr.InStrFindNum(TxtIn.Text);
            if (user.bIsNull) { TxtOut.Text = user.StrMsg; return; }            
            TxtOut.Text  = $"the number of figures ：{myStr.ListNum.Count}\r\n";
            TxtOut.Text += "Position of appearance ：";
            foreach (int item in myStr.ListNum){
                TxtOut.Text += item + " ";
            }           
        }
    }
}
